home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- # @(#) linkman 1.1 - link to existing man page
- #
- # Bob Denny - Mon Sep 16 17:02:40 1991
- #
- # If orig and link end in ".z", but orig is there without ".z"
- # (pack not needed), will link new without the ".z". Needed for
- # A/UX pre-formatted man page system.
- #
- # BUGS: Should support symbolic links
-
- src=$1
- srcnoz=`echo $1 | sed 's/\(.*\)\.z$/\1/`
- dest=$2
- destnoz=`echo $2 | sed 's/\(.*\)\.z$/\1/`
-
- rm -f $dest $destnoz
-
- if [ -f $src ] ; then
- ln $src $dest
- elif [ -f $srcnoz ] ; then
- ln $srcnoz $destnoz
- else
- echo "$0: source $1 nonexistent."
- exit 1
- fi
- exit 0
-
-
-